/*
**
** $VER: TextEditor_mcc.h V15.1 (12-Aug-97)
** Copyright © 1997 Allan Odgaard. All rights reserved.
**
*/
#define MUIC_TextEditor      'TextEditor.mcc'

#define TextEditorObject     MUI_NewObject(MUIC_TextEditor

#define TextEditor_Dummy    ($ad000000)

#define MUIA_TextEditor_AreaMarked         (TextEditor_Dummy + $14)
#define MUIA_TextEditor_ColorMap           (TextEditor_Dummy + $2f)
#define MUIA_TextEditor_Contents           (TextEditor_Dummy + $02)
#define MUIA_TextEditor_CursorX            (TextEditor_Dummy + $04)
#define MUIA_TextEditor_CursorY            (TextEditor_Dummy + $05)
#define MUIA_TextEditor_DoubleClickHook    (TextEditor_Dummy + $06)
#define MUIA_TextEditor_ExportHook         (TextEditor_Dummy + $08)
#define MUIA_TextEditor_ExportWrap         (TextEditor_Dummy + $09)
#define MUIA_TextEditor_FixedFont          (TextEditor_Dummy + $0a)
#define MUIA_TextEditor_Flow               (TextEditor_Dummy + $0b)
#define MUIA_TextEditor_HasChanged         (TextEditor_Dummy + $0c)
#define MUIA_TextEditor_HorizontalScroll   (TextEditor_Dummy + $2d)     /* Private and experimental! */
#define MUIA_TextEditor_ImportHook         (TextEditor_Dummy + $0e)
#define MUIA_TextEditor_ImportWrap         (TextEditor_Dummy + $10)
#define MUIA_TextEditor_InsertMode         (TextEditor_Dummy + $0f)
#define MUIA_TextEditor_InVirtualGroup     (TextEditor_Dummy + $1b)
#define MUIA_TextEditor_KeyBindings        (TextEditor_Dummy + $11)
#define MUIA_TextEditor_NumLock            (TextEditor_Dummy + $18)
#define MUIA_TextEditor_Pen                (TextEditor_Dummy + $2e)
#define MUIA_TextEditor_PopWindow_Open     (TextEditor_Dummy + $03)     /* Private!!! */
#define MUIA_TextEditor_Prop_DeltaFactor   (TextEditor_Dummy + $0d)
#define MUIA_TextEditor_Prop_Entries       (TextEditor_Dummy + $15)
#define MUIA_TextEditor_Prop_First         (TextEditor_Dummy + $20)
#define MUIA_TextEditor_Prop_Release       (TextEditor_Dummy + $01)     /* Private!!! */
#define MUIA_TextEditor_Prop_Visible       (TextEditor_Dummy + $16)
#define MUIA_TextEditor_Quiet              (TextEditor_Dummy + $17)
#define MUIA_TextEditor_ReadOnly           (TextEditor_Dummy + $19)
#define MUIA_TextEditor_RedoAvailable      (TextEditor_Dummy + $13)
#define MUIA_TextEditor_Separator          (TextEditor_Dummy + $2c)
#define MUIA_TextEditor_Slider             (TextEditor_Dummy + $1a)
#define MUIA_TextEditor_StyleBold          (TextEditor_Dummy + $1c)
#define MUIA_TextEditor_StyleItalic        (TextEditor_Dummy + $1d)
#define MUIA_TextEditor_StyleUnderline     (TextEditor_Dummy + $1e)
#define MUIA_TextEditor_TypeAndSpell       (TextEditor_Dummy + $07)
#define MUIA_TextEditor_UndoAvailable      (TextEditor_Dummy + $12)
#define MUIA_TextEditor_WrapBorder         (TextEditor_Dummy + $21)
#define MUIA_TextEditor_Rows               (TextEditor_Dummy + $32)
#define MUIA_TextEditor_Columns            (TextEditor_Dummy + $33)
#define MUIM_TextEditor_AddKeyBindings     (TextEditor_Dummy + $22)
#define MUIM_TextEditor_ARexxCmd           (TextEditor_Dummy + $23)
#define MUIM_TextEditor_ClearText          (TextEditor_Dummy + $24)
#define MUIM_TextEditor_ExportText         (TextEditor_Dummy + $25)
#define MUIM_TextEditor_HandleError        (TextEditor_Dummy + $1f)
#define MUIM_TextEditor_InsertText         (TextEditor_Dummy + $26)
#define MUIM_TextEditor_MacroBegin         (TextEditor_Dummy + $27)
#define MUIM_TextEditor_MacroEnd           (TextEditor_Dummy + $28)
#define MUIM_TextEditor_MacroExecute       (TextEditor_Dummy + $29)
#define MUIM_TextEditor_Replace            (TextEditor_Dummy + $2a)
#define MUIM_TextEditor_Search             (TextEditor_Dummy + $2b)

OBJECT MUIP_TextEditor_ARexxCmd
        MethodID:ULONG,
        command:PTR TO UBYTE

OBJECT MUIP_TextEditor_ClearText
        MethodID:ULONG

OBJECT MUIP_TextEditor_ExportText
        MethodID:ULONG

OBJECT MUIP_TextEditor_HandleError
        MethodID:ULONG,
        errorcode:ULONG

/* See below for error codes */
OBJECT MUIP_TextEditor_InsertText
        MethodID:ULONG,
        text:PTR TO UBYTE,
        pos:LONG

/* See below for positions */
OBJECT MUIP_TextEditor_Search
        MethodID:ULONG,
        string:PTR TO UBYTE,
        flags:LONG

/* See below for flags */
#define MUIV_TextEditor_ExportHook_Plain        $00000000
#define MUIV_TextEditor_ExportHook_EMail        $00000001
#define MUIV_TextEditor_Flow_Left               $00000000
#define MUIV_TextEditor_Flow_Center             $00000001
#define MUIV_TextEditor_Flow_Right              $00000002
#define MUIV_TextEditor_Flow_Justified          $00000003
#define MUIV_TextEditor_ImportHook_Plain        $00000000
#define MUIV_TextEditor_ImportHook_EMail        $00000002
#define MUIV_TextEditor_ImportHook_MIME         $00000003
#define MUIV_TextEditor_ImportHook_MIMEQuoted   $00000004
#define MUIV_TextEditor_InsertText_Cursor       $00000000
#define MUIV_TextEditor_InsertText_Top          $00000001
#define MUIV_TextEditor_InsertText_Bottom       $00000002
#define MUIV_TextEditor_LengthHook_Plain        $00000000
#define MUIV_TextEditor_LengthHook_ANSI         $00000001
#define MUIV_TextEditor_LengthHook_HTML         $00000002
#define MUIV_TextEditor_LengthHook_MAIL         $00000003

/* Flags for MUIM_TextEditor_Search */
#define MUIF_TextEditor_Search_FromTop        (1 << 0)
#define MUIF_TextEditor_Search_Next           (1 << 1)
#define MUIF_TextEditor_Search_CaseSensitive  (1 << 2)
#define MUIF_TextEditor_Search_DOSPattern     (1 << 3)
#define MUIF_TextEditor_Search_Backwards      (1 << 4)

/* Error codes given as argument to MUIM_TextEditor_HandleError */
#define Error_ClipboardIsEmpty          $01
#define Error_ClipboardIsNotFTXT        $02
#define Error_MacroBufferIsFull         $03
#define Error_MemoryAllocationFailed    $04
#define Error_NoAreaMarked              $05
#define Error_NoMacroDefined            $06
#define Error_NothingToRedo             $07
#define Error_NothingToUndo             $08
#define Error_NotEnoughUndoMem          $09     /* This will cause all the stored undos to be freed */
#define Error_StringNotFound            $0a
#define Error_NoBookmarkInstalled       $0b
#define Error_BookmarkHasBeenLost       $0c

OBJECT ClickMessage
        LineContents:PTR TO UBYTE,    /* This field is ReadOnly!!! */
        ClickPosition:ULONG

/* Definitions for Separator type */
#define LNSB_Top              0 /* Mutual exclude: */
#define LNSB_Middle           1 /* Placement of    */
#define LNSB_Bottom           2 /*  the separator  */
#define LNSB_StrikeThru       3 /* Let separator go thru the textfont */
#define LNSB_Thick            4 /* Extra thick separator */
#define LNSF_Top              (1<<LNSB_Top)
#define LNSF_Middle           (1<<LNSB_Middle)
#define LNSF_Bottom           (1<<LNSB_Bottom)
#define LNSF_StrikeThru       (1<<LNSB_StrikeThru)
#define LNSF_Thick            (1<<LNSB_Thick)

/* TEXTEDITOR_MCC_H */

